package com.waverider.promotion.biz.dao;

import java.util.List;
import java.util.Map;

import com.waverider.promotion.domain.PromotionDO;
import com.waverider.promotion.model.PromotionQueryModel;

/**
 * 
 * @author sihai
 * 
 */
public interface PromotionDAO {
	/**
	 * 
	 * @param discountItem
	 */
	Long insert(PromotionDO discountItem);

	/**
	 * 
	 * @param goodsId
	 */
	PromotionDO queryByGoodsId(Long goodsId);

	/**
	 * 
	 * @param id
	 * @return
	 */
	PromotionDO queryById(Long id);

	/**
	 * 
	 * @param queryModel
	 * @return
	 */
	List<PromotionDO> query(PromotionQueryModel queryModel);

	/**
	 * 
	 * @param queryModel
	 * @return
	 */
	Long count(PromotionQueryModel queryModel);

	/**
	 * 
	 * @param discountItem
	 * @return
	 */
	boolean update(PromotionDO discountItem);

	/**
	 * 
	 * @param id
	 * @return
	 */
	boolean delete(Long id);

	/**
	 * @param params
	 * @return
	 */
	List<PromotionDO> getPromotionByShopId(Map<String, Long> params);

	/**
	 * @param shopId
	 * @return
	 */
	List<PromotionDO> queryExpirePromotionByShopId(Long shopId);

	/**
	 * @param shopId
	 * @return
	 */
	int getValidatePromotionCountByShopId(Long shopId);
}
